#include <bits/stdc++.h>
using namespace std;

int main() {
	if (fopen("tinhtong.inp", "r")){
        freopen("tinhtong.inp", "r", stdin);
        freopen("tinhtong.out", "w", stdout);
   }
	int i, n, j;
 	long long s = 0, k;
 	cin >> n;

	i = 1;
 	while (i <= n) {
	 	k = n/i;
      	j = n/k;
      	s = s + k*(j-i+1);
      	i = j + 1;
    }
 	cout << s << endl;
 	return 0;
}


